//
//  PKRequestManager.h
//  PianKe
//
//  Created by lanou on 15/9/26.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import <Foundation/Foundation.h>
//网络请求完成的block
typedef void(^RequestFinish) (NSData *);
//网络请求失败的block
typedef void(^RequestError) (NSError *);
typedef NS_ENUM(NSInteger, RequestType)
{
POST,
    GET
}
;
@interface PKRequestManager : NSObject
//外界会调用这个方法，传递过来我们请求的时候所需要的参数，同时吧请求完成后处理的函数也传给这个类，方便这个类请求之后把响应结果通过block回传给外界
-(void)requestWithType:(RequestType)type urlString:(NSString *)urlString patDic:(NSDictionary *)parDic finish:(RequestFinish)finish Error:(RequestError)error;
+(void)requestWithType:(RequestType)type urlString:(NSString *)urlString patDic:(NSDictionary *)parDic finish:(RequestFinish)finish Error:(RequestError)error;

@end
